package cn.edu.zhku.citrusmonitor.person.util;

import java.awt.Color;
import java.util.Random;
/**
 * 获得rgb范围在fc到bc之间的随机颜色
 * @author Sayid Chan
 *
 */
public class RandomColor {
	public static Color getRandColor(int fc, int bc) {
		// 取其随机颜色
		Random random = new Random();
		if (fc > 255) {
			fc = 255;
		}
		if (bc > 255) {
			bc = 255;
		}
		int r = fc + random.nextInt(bc - fc);
		int g = fc + random.nextInt(bc - fc);
		int b = fc + random.nextInt(bc - fc);
		return new Color(r, g, b);
	}
}
